﻿#ifndef LIGHTTOOLBAR_H
#define LIGHTTOOLBAR_H
#include <QToolBar>
#include <QHBoxLayout>
#include <QCheckBox>
#include <QSlider>
#include <QLabel>
#include <QFrame>

#include "lampcontrol.h"

namespace Qly {
class LightToolBar : public QToolBar
{
    Q_OBJECT
public:
    LightToolBar(QWidget *parent = Q_NULLPTR);
    void attach(LampControl * control);
private:
    void initContent();
    void initConnection();

    void on_horizontalSliderTop_valueChanged(int value);
    void on_horizontalSliderBottom_valueChanged(int value);
    void on_checkBoxTop_checked(bool on);
    void on_checkBoxBottom_checked(bool on);

    QCheckBox *checkBoxTop = nullptr;
    QSlider *horizontalSliderTop = nullptr;
    QLabel *labelValueTop = nullptr;
    QCheckBox *checkBoxBottom = nullptr;
    QSlider *horizontalSliderBottom = nullptr;
    QLabel *labelValueBottom = nullptr;

    Qly::LampControl * m_control = nullptr;
};
}


#endif // LIGHTTOOLBAR_H
